package com.heima.controller;

import com.heima.pojo.vo.BusinessTypeVo;
import com.heima.service.BusinessService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/api/vm-service/businessType")
@Api(tags = "商圈接口")
@RequiredArgsConstructor
public class BusinessController {

    private final BusinessService businessService;

    /**
     * 查询商圈列表
     * @return
     */
    @GetMapping
    public List<BusinessTypeVo> queryAll(){
        log.info("查询商圈列表");
        return businessService.queryAll();
    }
}
